<?php

namespace dengje\workerman\process\queue;

use dengje\workerman\process\queue\task\Test;
use Workerman\Worker;
use Workerman\RedisQueue\Client;
use Workerman\Timer;
use dengje\workerman\Heartbeat;

class Handler
{
	public function onWorkerStart(Worker $worker): void
	{
		Heartbeat::start();
		$prefix = config('cache.stores.redis.prefix');
		$port = config('cache.stores.redis.port');
		$password = config('cache.stores.redis.password');
		$host = config('cache.stores.redis.host');



		(new Core("redis://{$host}:{$port}",[
			'prefix' => $prefix,
			'auth' => $password,
		]))->subscribe('',function($data){
			// var_dump($data);
		});
	

	}
}